﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="uMESTeamProductionKanBanForm1.aspx.cs" Inherits="uMESTeamProductionKanBanForm1" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8;" />
    <title>班组生产看板</title>
    <script type="text/javascript" src="../Scripts/jquery-1.8.2.js"></script>
    <script type="text/javascript" src="../Scripts/echarts.js"></script>
    <script type="text/javascript" src="../Scripts/json2.js"></script>
    <link href="../style/Kanban/uMESFactoryProductionKanBanForm.css" rel="stylesheet" type="text/css" />
    <style>
        #Div1, #Div2 {
            font-family: STKaiti;
            float: left;
            color: #ccc;
            width: 49.5%;
            height: 437px;
            text-align: center;
            border-radius: 50px;
            border: 1px solid #0b2b66;
            behavior: url(PIE.htc);
        }

        #Div3, #Div4, #Div5 {
            font-family: STKaiti;
            float: left;
            color: #ccc;
            width: 33%;
            height: 437px;
            text-align: center;
            border-radius: 50px;
            border: 1px solid #0b2b66;
            behavior: url(PIE.htc);
        }
    </style>
</head>
<body style="background-color: rgb(9,23,58); font-family: 'Microsoft YaHei'">
    <form id="form1" runat="server">
        <div>
            <div>
                <input id="teamid" type="hidden" value="<%= TeamID%>" />
                <input id="ip" type="hidden" value="<%= IP%>" />
                <input id="team" type="hidden" value="<%= Team%>" />
                <div id="divScreen" style="width: 18%; height: 80px; line-height: 80px; overflow: hidden; float: left; display: table-cell; vertical-align: middle;">
                    <span style="margin-left: 10px; color: #ffffff;">年份:</span>
                    <select id="searchYear" style="width: 65px; height: 30px; padding-left: 5px;" onchange="JavaScript:searchTime();getProductLook();">
                    </select>
                    <span style="margin-left: 10px; color: #ffffff;">月份:</span>
                    <select id="searchMonth" style="width: 50px; height: 30px; padding-left: 5px;" onchange="JavaScript:getProductLook();">
                    </select>
                </div>
                <div class="headCaption1"><%=FactoryName%>生产看板</div>
                <div id="currentTime"></div>
            </div>
            <div>
                <div id="Div1">
                    <h1>分厂月度生产信息统计</h1>
                    <div id="ProductionStatistics" class="TitleStyle1"></div>
                </div>
                <div id="Div2">
                    <h1>质量缺陷分析</h1>
                    <div id="QualDefectionAnalysis1" class="TitleStyle2"></div>
                    <div id="QualDefectionAnalysis" class="TitleStyle2"></div>
                </div>
                <div id="Div3">
                    <h1>班组任务完成率</h1>
                    <div id="FinishRateStatistics" class="TitleStyle1"></div>
                </div>
                <div id="Div4">
                    <h1>班组合格率统计</h1>
                    <div id="QualRateStatistics" class="TitleStyle1"></div>
                </div>
                <div id="Div5">
                    <h1>班组工时统计</h1>
                    <div id="WorkReport" class="TitleStyle1"></div>
                </div>
            </div>
        </div>
    </form>
</body>
</html>
<script src="../Scripts/Kanban/KanbanJs.js" type="text/javascript"></script>
<script src="../Scripts/Kanban/TeamProduction1.js" type="text/javascript"></script>
<script type="text/javascript">
    $(function () {
        //var w = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
        var h = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;
        $('#Div1, #Div2, #Div3, #Div4, #Div5').css('height', (h - 80) * 0.5 + 'px');
        var teamid = jQuery.trim($("#teamid").val());
        var ip = jQuery.trim($("#ip").val());
        //解决echarts4出现console未定义异常
        if (!window.console || !console.firebug) {
            var names = ["log", "debug", "info", "warn", "error", "assert", "dir", "dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace", "profile", "profileEnd"];
            window.console = {};
            for (var i = 0; i < names.length; ++i)
                window.console[names[i]] = function () { }
        }
        searchTime();
        setInterval(showTime, 500);
        getProductLook();
        window.setInterval(function () {
            getProductLook();
        }, 30000);
    });
    function getProductLook() {
        GetProductionStatisticsInfo();
        GetQualRateStatistics();
        GetFinishRateStatistics();
        GetQualDefectionAnalysis();
        GetWorkReport();
    };
</script>
